home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3dm / audiofile / AFinitsampfmt.z / AFinitsampfmt
Encoding:
Text File  |  2002-10-03  |  10.4 KB  |  199 lines

  1.  
  2.  
  3.  
  4. aaaaffffIIIInnnniiiittttSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt((((3333ddddmmmm))))                                aaaaffffIIIInnnniiiittttSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      afInitSampleFormat, AFinitsampfmt, afInitByteOrder, afInitChannels,
  10.      afInitRate - initialize the audio data format in an AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp for a
  11.      specified audio track
  12.  
  13. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiiooooffffiiiilllleeee....hhhh>>>>
  15.  
  16.      vvvvooooiiiidddd aaaaffffIIIInnnniiiittttSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt((((AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp sssseeeettttuuuupppp,,,, iiiinnnntttt ttttrrrraaaacccckkkk,,,,
  17.                              iiiinnnntttt ssssaaaammmmppppffffmmmmtttt,,,, iiiinnnntttt ssssaaaammmmppppwwwwiiiiddddtttthhhh))))
  18.  
  19.      vvvvooooiiiidddd aaaaffffIIIInnnniiiittttBBBByyyytttteeeeOOOOrrrrddddeeeerrrr((((AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp sssseeeettttuuuupppp,,,, iiiinnnntttt ttttrrrraaaacccckkkk,,,, iiiinnnntttt bbbbyyyytttteeeeoooorrrrddddeeeerrrr))))
  20.  
  21.      vvvvooooiiiidddd aaaaffffIIIInnnniiiittttCCCChhhhaaaannnnnnnneeeellllssss((((AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp sssseeeettttuuuupppp,,,, iiiinnnntttt ttttrrrraaaacccckkkk,,,, iiiinnnntttt cccchhhhaaaannnnnnnneeeellllssss))))
  22.  
  23.      vvvvooooiiiidddd aaaaffffIIIInnnniiiittttRRRRaaaatttteeee((((AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp sssseeeettttuuuupppp,,,, iiiinnnntttt ttttrrrraaaacccckkkk,,,, ddddoooouuuubbbblllleeee rrrraaaatttteeee))))
  24.  
  25. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR
  26.      _s_e_t_u_p       is an AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp structure, previously created by a call to
  27.                  aaaaffffNNNNeeeewwwwFFFFiiiilllleeeeSSSSeeeettttuuuupppp(3dm).
  28.  
  29.      _t_r_a_c_k       is an integer which identifies an audio track in _s_e_t_u_p.
  30.  
  31.                  Since all currently supported file formats contain only one
  32.                  audio track, the value AAAAFFFF____DDDDEEEEFFFFAAAAUUUULLLLTTTT____TTTTRRRRAAAACCCCKKKK should always be used
  33.                  here.
  34.  
  35.      _s_a_m_p_f_m_t     an integer constant which denotes a sample format.
  36.  
  37.      _s_a_m_p_w_i_d_t_h   a positive integer value which specifies the number of bits
  38.                  in a sample data point.
  39.  
  40.      _c_h_a_n_n_e_l_s    is a positive integer value which indicates the number of
  41.                  interleaved audio channels in the audio track.
  42.  
  43.      _b_y_t_e_o_r_d_e_r   is a positive integer token which indicates the byte order of
  44.                  the samples in the audio track.
  45.  
  46.      _r_a_t_e        is a positive double-precision floating point value which
  47.                  specifies an audio sample rate in Hz to be associated with
  48.                  _t_r_a_c_k.
  49.  
  50.      aaaaffffIIIInnnniiiittttSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt(((()))) initializes the sample format and width parameters
  51.                  in an AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp structure for an audio track.
  52.  
  53.      The following values may be used for _s_a_m_p_f_m_t
  54.  
  55.      AAAAFFFF____SSSSAAAAMMMMPPPPFFFFMMMMTTTT____TTTTWWWWOOOOSSSSCCCCOOOOMMMMPPPP
  56.           Two's complement samples.  This is currently the only legal value
  57.           for AAAAIIIIFFFFFFFF(4)/AIFF-C and 9-32 bit WWWWAAAAVVVVEEEE(4) format files, and is a legal
  58.           value for all other supported file formats as well.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. aaaaffffIIIInnnniiiittttSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt((((3333ddddmmmm))))                                aaaaffffIIIInnnniiiittttSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74.      AAAAFFFF____SSSSAAAAMMMMPPPPFFFFMMMMTTTT____UUUUNNNNSSSSIIIIGGGGNNNNEEEEDDDD
  75.           Unsigned samples.  This is the standard value for 1-8 bit WWWWAAAAVVVVEEEE(4)
  76.           format files.
  77.  
  78.      AAAAFFFF____SSSSAAAAMMMMPPPPFFFFMMMMTTTT____FFFFLLLLOOOOAAAATTTT
  79.           32-bit floating point samples.  This may be used with NNNNeeeeXXXXTTTT(4) and
  80.           BBBBIIIICCCCSSSSFFFF(4) format files, as may AAAAFFFF____SSSSAAAAMMMMPPPPFFFFMMMMTTTT____TTTTWWWWOOOOSSSSCCCCOOOOMMMMPPPP.
  81.  
  82.      AAAAFFFF____SSSSAAAAMMMMPPPPFFFFMMMMTTTT____DDDDOOOOUUUUBBBBLLLLEEEE
  83.           64-bit double-precision floating point samples.  Currently, this may
  84.           only be used with the NNNNeeeeXXXXTTTT(4) format files.
  85.  
  86.      aaaaffffIIIInnnniiiittttBBBByyyytttteeeeOOOOrrrrddddeeeerrrr(((()))) initializes the byte order (big- or little-endian) of
  87.      the samples in an AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp structure for an audio track.
  88.  
  89.      The following values may be used for _b_y_t_e_o_r_d_e_r
  90.  
  91.      AAAAFFFF____BBBBYYYYTTTTEEEEOOOORRRRDDDDEEEERRRR____BBBBIIIIGGGGEEEENNNNDDDDIIIIAAAANNNN
  92.           Big-endian byte order samples.  This is the only legal value for
  93.           AIFF/AIFF-C, NNNNeeeeXXXXTTTT(4), BBBBIIIICCCCSSSSFFFF(4) and Sound Designer II (ssssdddd2222(4)) files,
  94.           and is the default value.
  95.  
  96.      AAAAFFFF____BBBBYYYYTTTTEEEEOOOORRRRDDDDEEEERRRR____LLLLIIIITTTTTTTTLLLLEEEEEEEENNNNDDDDIIIIAAAANNNN
  97.           Little-endian byte order samples.  This is the standard value for
  98.           WWWWAAAAVVVVEEEE(4) format files.
  99.  
  100.      aaaaffffIIIInnnniiiittttCCCChhhhaaaannnnnnnneeeellllssss(((()))) initializes the number of interleaved channels
  101.           in an AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp structure for an audio track.  Legal values vary
  102.           depending on the file format (see aaaaffffIIIInnnniiiittttFFFFiiiilllleeeeFFFFoooorrrrmmmmaaaatttt(3dm)).
  103.  
  104.      aaaaffffIIIInnnniiiittttRRRRaaaatttteeee(((()))) initializes the sample rate in Hz in an AAAAFFFFffffiiiilllleeeesssseeeettttuuuupppp
  105.      structure for an audio track.  Most file formats have no restrictions on
  106.      sample rate values, the exception being the NNNNeeeeXXXXTTTT(4) format, which
  107.      requires integer values only.
  108.  
  109.      When a file is opened for writing by passing _s_e_t_u_p to aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm),
  110.      the track will be configured to store data according to the data format,
  111.      width, number of channels, or sample rate specified.
  112.  
  113. CCCCAAAAVVVVEEEEAAAATTTTSSSS
  114.      The Audio File Library will continue to support additional file formats.
  115.      The ability of these file formats to store data of various sample formats
  116.      will vary.  If you are choosing a file format other than the default
  117.      format, you should make sure that you explicitly specify a sample format
  118.      for this file's tracks which is compatible with that file format.  See
  119.      aaaaffffGGGGeeeettttSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt(3dm) for important information about handling this
  120.      situation.
  121.  
  122.      In the case where the audio track in a file is configured for
  123.      compression, _s_a_m_p_f_m_t and _s_a_m_p_w_i_d_t_h should match the data format specified
  124.      by the compression algorithm.  For example, the software G.722 compressor
  125.      expects to encode 16-bit two's complement linear PCM input data. In
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. aaaaffffIIIInnnniiiittttSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt((((3333ddddmmmm))))                                aaaaffffIIIInnnniiiittttSSSSaaaammmmpppplllleeeeFFFFoooorrrrmmmmaaaatttt((((3333ddddmmmm))))
  137.  
  138.  
  139.  
  140.      addition, many compression formats have restrictions on sample rate
  141.      and/or channel count as well.  See aaaaffffIIIInnnniiiittttCCCCoooommmmpppprrrreeeessssssssiiiioooonnnn(3dm) for more
  142.      information.
  143.  
  144. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  145.      afNewFileSetup(3dm), afOpenFile(3dm), afWriteFrames(3dm),
  146.      afSetVirtualSampleFormat(3dm), afGetVirtualSampleFormat(3dm),
  147.      afInitCompression(3dm)
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.